3.53 \(\int \frac{(2+3 x+5 x^2)^2}{(3-x+2 x^2)^3} \, dx\)

Optimal. Leaf size=64 \[ \frac{121 (19-7 x)}{368 \left (2 x^2-x+3\right )^2}-\frac{55 (332 x+975)}{8464 \left (2 x^2-x+3\right )}-\frac{4330 \tan ^{-1}\left (\frac{1-4 x}{\sqrt{23}}\right )}{529 \sqrt{23}} \]

[Out]

(121*(19 - 7*x))/(368*(3 - x + 2*x^2)^2) - (55*(975 + 332*x))/(8464*(3 - x + 2*x^2)) - (4330*ArcTan[(1 - 4*x)/
Sqrt[23]])/(529*Sqrt[23])

________________________________________________________________________________________

Rubi [A]  time = 0.0529804, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {1660, 12, 618, 204} \[ \frac{121 (19-7 x)}{368 \left (2 x^2-x+3\right )^2}-\frac{55 (332 x+975)}{8464 \left (2 x^2-x+3\right )}-\frac{4330 \tan ^{-1}\left (\frac{1-4 x}{\sqrt{23}}\right )}{529 \sqrt{23}} \]

Antiderivative was successfully verified.

[In]

Int[(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^3,x]

[Out]

(121*(19 - 7*x))/(368*(3 - x + 2*x^2)^2) - (55*(975 + 332*x))/(8464*(3 - x + 2*x^2)) - (4330*ArcTan[(1 - 4*x)/
Sqrt[23]])/(529*Sqrt[23])

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\left (2+3 x+5 x^2\right )^2}{\left (3-x+2 x^2\right )^3} \, dx &=\frac{121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}+\frac{1}{46} \int \frac{-\frac{195}{8}+\frac{1955 x}{2}+575 x^2}{\left (3-x+2 x^2\right )^2} \, dx\\ &=\frac{121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac{55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}+\frac{\int \frac{4330}{3-x+2 x^2} \, dx}{1058}\\ &=\frac{121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac{55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}+\frac{2165}{529} \int \frac{1}{3-x+2 x^2} \, dx\\ &=\frac{121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac{55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}-\frac{4330}{529} \operatorname{Subst}\left (\int \frac{1}{-23-x^2} \, dx,x,-1+4 x\right )\\ &=\frac{121 (19-7 x)}{368 \left (3-x+2 x^2\right )^2}-\frac{55 (975+332 x)}{8464 \left (3-x+2 x^2\right )}-\frac{4330 \tan ^{-1}\left (\frac{1-4 x}{\sqrt{23}}\right )}{529 \sqrt{23}}\\ \end{align*}

Mathematica [A]  time = 0.0290323, size = 51, normalized size = 0.8 \[ \frac{4330 \tan ^{-1}\left (\frac{4 x-1}{\sqrt{23}}\right )}{529 \sqrt{23}}-\frac{11 \left (1660 x^3+4045 x^2+938 x+4909\right )}{4232 \left (-2 x^2+x-3\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^3,x]

[Out]

(-11*(4909 + 938*x + 4045*x^2 + 1660*x^3))/(4232*(-3 + x - 2*x^2)^2) + (4330*ArcTan[(-1 + 4*x)/Sqrt[23]])/(529
*Sqrt[23])

________________________________________________________________________________________

Maple [A]  time = 0.047, size = 47, normalized size = 0.7 \begin{align*} 4\,{\frac{1}{ \left ( 2\,{x}^{2}-x+3 \right ) ^{2}} \left ( -{\frac{4565\,{x}^{3}}{4232}}-{\frac{44495\,{x}^{2}}{16928}}-{\frac{5159\,x}{8464}}-{\frac{53999}{16928}} \right ) }+{\frac{4330\,\sqrt{23}}{12167}\arctan \left ({\frac{ \left ( -1+4\,x \right ) \sqrt{23}}{23}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x)

[Out]

4*(-4565/4232*x^3-44495/16928*x^2-5159/8464*x-53999/16928)/(2*x^2-x+3)^2+4330/12167*23^(1/2)*arctan(1/23*(-1+4
*x)*23^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.43885, size = 76, normalized size = 1.19 \begin{align*} \frac{4330}{12167} \, \sqrt{23} \arctan \left (\frac{1}{23} \, \sqrt{23}{\left (4 \, x - 1\right )}\right ) - \frac{11 \,{\left (1660 \, x^{3} + 4045 \, x^{2} + 938 \, x + 4909\right )}}{4232 \,{\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x, algorithm="maxima")

[Out]

4330/12167*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) - 11/4232*(1660*x^3 + 4045*x^2 + 938*x + 4909)/(4*x^4 - 4*
x^3 + 13*x^2 - 6*x + 9)

________________________________________________________________________________________

Fricas [A]  time = 1.00681, size = 239, normalized size = 3.73 \begin{align*} -\frac{419980 \, x^{3} - 34640 \, \sqrt{23}{\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )} \arctan \left (\frac{1}{23} \, \sqrt{23}{\left (4 \, x - 1\right )}\right ) + 1023385 \, x^{2} + 237314 \, x + 1241977}{97336 \,{\left (4 \, x^{4} - 4 \, x^{3} + 13 \, x^{2} - 6 \, x + 9\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x, algorithm="fricas")

[Out]

-1/97336*(419980*x^3 - 34640*sqrt(23)*(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9)*arctan(1/23*sqrt(23)*(4*x - 1)) + 102
3385*x^2 + 237314*x + 1241977)/(4*x^4 - 4*x^3 + 13*x^2 - 6*x + 9)

________________________________________________________________________________________

Sympy [A]  time = 0.275541, size = 61, normalized size = 0.95 \begin{align*} - \frac{18260 x^{3} + 44495 x^{2} + 10318 x + 53999}{16928 x^{4} - 16928 x^{3} + 55016 x^{2} - 25392 x + 38088} + \frac{4330 \sqrt{23} \operatorname{atan}{\left (\frac{4 \sqrt{23} x}{23} - \frac{\sqrt{23}}{23} \right )}}{12167} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**2+3*x+2)**2/(2*x**2-x+3)**3,x)

[Out]

-(18260*x**3 + 44495*x**2 + 10318*x + 53999)/(16928*x**4 - 16928*x**3 + 55016*x**2 - 25392*x + 38088) + 4330*s
qrt(23)*atan(4*sqrt(23)*x/23 - sqrt(23)/23)/12167

________________________________________________________________________________________

Giac [A]  time = 1.29135, size = 62, normalized size = 0.97 \begin{align*} \frac{4330}{12167} \, \sqrt{23} \arctan \left (\frac{1}{23} \, \sqrt{23}{\left (4 \, x - 1\right )}\right ) - \frac{11 \,{\left (1660 \, x^{3} + 4045 \, x^{2} + 938 \, x + 4909\right )}}{4232 \,{\left (2 \, x^{2} - x + 3\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)^2/(2*x^2-x+3)^3,x, algorithm="giac")

[Out]

4330/12167*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) - 11/4232*(1660*x^3 + 4045*x^2 + 938*x + 4909)/(2*x^2 - x
+ 3)^2